package org.example.mq.mqserver.core;

import java.io.Serializable;

public class BasicProperties implements Serializable {
//    唯一身份标识
    private String messageId;
/*    对应关系：和binding匹配
    交换机类型是DIRECT，routingKey为目标队列的名字
    交换机类型是FANOUT，routingKey为无（不使用）
    交换机类型是TOPIC，routingKey和bindingKey绑定

    */

    private String routingKey;
//    是否持久化。1-不持久化，2-持久化
    private int deliverMode = 1;

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getRoutingKey() {
        return routingKey;
    }

    public void setRoutingKey(String routingKey) {
        this.routingKey = routingKey;
    }

    public int getDeliverMode() {
        return deliverMode;
    }

    public void setDeliverMode(int deliverMode) {
        this.deliverMode = deliverMode;
    }

    @Override
    public String toString() {
        return "BasicProperties{" +
                "messageId='" + messageId + '\'' +
                ", routingKey='" + routingKey + '\'' +
                ", deliverMode=" + deliverMode +
                '}';
    }
}
